package com.yuke.cloud.service.cmc.controller.frontend;

import com.yuke.cloud.common.core.support.BaseController;
import com.yuke.cloud.common.util.wrapper.WrapMapper;
import com.yuke.cloud.common.util.wrapper.Wrapper;
import com.yuke.cloud.service.cmc.entity.CmsAppTopic;
import com.yuke.cloud.service.cmc.service.CmsAppTopicService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
* Created by wg on 2019/01/18.
*/
@Api(value = "WEB - CmsAppTopicController", tags = "处理CmsAppTopic相关请求", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
@RestController
@RequestMapping("/mall/cms/app_topic")
public class MallCmsAppTopicController extends BaseController {
    @Resource
    private CmsAppTopicService cmsAppTopicService;

    @PostMapping("/app/condition")
    @ApiOperation(httpMethod = "POST", value = "app根据条件获取详情")
    public Wrapper<List<CmsAppTopic>> getListDetailByCondition(@ApiParam(name = "cmsAppTopic", value = "该数据记录的POJO") @RequestBody CmsAppTopic cmsAppTopic) {
        return WrapMapper.ok(cmsAppTopicService.getListDetailByCondition(cmsAppTopic));
    }

}
